package com.along.game.dao.impl;

import java.math.BigDecimal;
import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Repository;


import com.along.framework.dao.base.IBaseDao;
import com.along.game.dao.BaseInfoDAO;
import com.along.game.model.Bigpic;
import com.along.game.model.GameHouse;
import com.along.game.model.GameTable;
import com.along.game.model.Gamescene;
import com.along.game.model.Smallpic;
import com.along.game.model.SysMenu;


@Repository("baseInfoDAO")
public class BaseInfoDAOImpl  implements BaseInfoDAO{
	@Resource(name="baseDao")
	private IBaseDao<GameTable,Long> dao;
	@Resource(name="baseDao")
	private IBaseDao<Bigpic,Long> bigpicdao;
	@Resource(name="baseDao")
	private IBaseDao<Smallpic,Long> smallpicdao;
	@Resource(name="baseDao")
	private IBaseDao<Gamescene,Long> gamescenedao;
	
	
	/**
	 * 添加游戏桌子
	 * @param htGameTableVO
	 * @return
	 */
		public int loadGameTable(GameTable gameTableVO){
			   
			// TODO Auto-generated method stub
			StringBuilder sb = new StringBuilder();
			sb.append("insert into gametable (");
			sb.append("desk_id,filed_id, house_name, left_user, top_user, right_user, bottom_user, room_state");
			sb.append(") values(seq_gametable_id.nextVal,?,?,?,?,?,?,?)");
		return	dao.jdbc().update(sb.toString(),new Object[]{
			 gameTableVO.getFiled_id(),
			 gameTableVO.getHouse_name(),
			 gameTableVO.getLeft_user(),
			 gameTableVO.getTop_user(),
			 gameTableVO.getRight_user(),
			 gameTableVO.getBottom_user(),
			 gameTableVO.getRoom_state()
			});
			
			

			
		}

	    
	     /**
	      * 根据ID查询游戏桌子详细
	      * @param send_id
	      * @return
	      * @throws BizException
	      */
	     public GameTable queryGameTableDetail(String desk_id){
	    	 
	    		// TODO Auto-generated method stub
		 		StringBuilder sb = new StringBuilder();
		 		sb.append(" select filed_id, house_name, left_user, top_user, right_user, bottom_user, room_state, desk_id from gametable where desk_id=?");
		return	(GameTable)dao.jdbc().queryForObject(sb.toString(),new Object[]{desk_id},GameTable.class);
					
				
	    	 
	     }
	     
		 /**
	 	  * 保存游戏桌子信息 
	 	  * @param htGameTableVO
	 	  * @return
	 	  * @throws BizException
	 	  */
	 	public int saveGameTable(GameTable  gameTableVO){
	 		
	 		
	 		// TODO Auto-generated method stub
	 		StringBuilder sb = new StringBuilder();
	 		sb.append(" update  gametable set  house_name=?, room_state=?,filed_id=?  where desk_id=?");
			return	dao.jdbc().update(sb.toString(),new Object[]{
				 gameTableVO.getHouse_name(),
			
				 gameTableVO.getRoom_state(),
				 gameTableVO.getFiled_id(),
				 gameTableVO.getDesk_id()
				});
	 		
	 	}
	 	/**
	 	 * 
	 	 * @param filed_id 要删除的桌子
	 	 * @return
	 	 * @throws BizException
	 	 */
	 	public int removeGameTable(String desk_id) {
	 		
	 		// TODO Auto-generated method stub
	 		StringBuilder sb = new StringBuilder();
	 		sb.append(" delete gametable   where desk_id=?");
			return	dao.jdbc().update(sb.toString(),
				new Object[]{ desk_id});
			
				}
	 		
	 		


	 	/**
	 	 * 依据条件查询游戏桌子列表
	 	 * @param pageSize  页码大小
	 	 * @param curPage   当前页
	 	 * @param smsgroupVO  smsgroupVO
	 	 * @return
	 	 * @throws BizException
	 	 */
		public List queryGameTable(int startrow, int endrow, GameTable gameTableVO){
			
			
			// TODO Auto-generated method stub
	 		StringBuilder sb = new StringBuilder();
	 		sb.append(" select filed_id, house_name, left_user, top_user, right_user, bottom_user, room_state,desk_id from( select ta.*,rownum rn ");
	 		sb.append(" from (select ma.*,rownum  tn from(select *  from gametable  t )ma)  ");
	 		sb.append(" ta where tn<=? ) f where f.rn>? ");
			return	dao.jdbc().list(sb.toString(),new Object[]{endrow,startrow}, GameTable.class);
				
		}
	   
		/**
	     * 查询游戏桌子记录数
	     * @param  tourOrderVO
	     * @return
	     * @throws BizException
	     */
	    public int queryGameTableCount(GameTable gametable){
	    	
	    	StringBuilder sb = new StringBuilder();
	    	String queryFiledstr="";
		    sb.append("select count(*)   from gametable ");
		
			Object[] queryField=queryFiledstr.split(","); 
   
         if(queryFiledstr.equals(""))
 			return	dao.jdbc().getJdbcTemplate().queryForInt(sb.toString());
 		else
 			return	dao.jdbc().getJdbcTemplate().queryForInt(sb.toString(),queryField);
 	}

         

	    /**
	     * 读取游戏桌子标中指定的条数
	     * @param readnum
	     * @return
	     */
	    public List  queryGameTable(int readnum) {
	    	
	    
	    	StringBuilder sb = new StringBuilder();
	    	sb.append("select ta.*,rownum rn ");
	    			sb.append("from (select ma.*,rownum  tn from(select *  from gametable  t )ma) ");
	    		sb.append("	ta where tn<=? ");
				return	dao.jdbc().list(sb.toString(),new Object[]{readnum}, GameTable.class);
	    }
		
	
	    
	    ////========大图片管理=========//////////////////
	    
	    /**
		 * 添加大图片
		 * @param htGameTableVO
		 * @return
		 */
			public int loadBigPic(Bigpic BigPicVO){
				   
				// TODO Auto-generated method stub
				StringBuilder sb = new StringBuilder();
				sb.append("insert into Bigpic (");
				sb.append("id, pic_name, pic_url, if_enable");
				sb.append(") values(seq_BigPic_id.nextVal,?,?,?)");
			return	bigpicdao.jdbc().update(sb.toString(),new Object[]{
			
				 BigPicVO.getPicName(),
				 BigPicVO.getPicUrl(),
				 BigPicVO.getIfEnable()
				
				});
				
				

				
			}

		    
		     /**
		      * 根据ID查询大图片详细信息 
		      * @param pic_id
		      * @return
		      * @throws BizException
		      */
		     public Bigpic queryBigPicDetail(String pic_id){
		    	 
		    		// TODO Auto-generated method stub
			 		StringBuilder sb = new StringBuilder();
			 		sb.append(" select id, pic_name, pic_url, if_enable from Bigpic where id=?");
			return	(Bigpic)bigpicdao.jdbc().queryForObject(sb.toString(),new Object[]{pic_id},Bigpic.class);
						
					
		    	 
		     }
		     
			 /**
		 	  * 保存大图片信息
		 	  * @param htBigPicVO
		 	  * @return
		 	  * @throws BizException
		 	  */
		 	public int saveBigPic(Bigpic  BigPicVO){
		 		
		 		
		 		// TODO Auto-generated method stub
		 		StringBuilder sb = new StringBuilder();
		 		sb.append(" update  BigPic set  pic_name=?, pic_url=?,if_enable=?  where id=?");
		
		 		
		 		return	bigpicdao.jdbc().update(sb.toString(),new Object[]{
					 BigPicVO.getPicName(),
				     BigPicVO.getPicUrl(),
					 BigPicVO.getIfEnable(),
					 BigPicVO.getId()
					
					});
		 		
		 	}
		 	/**
		 	 * 
		 	 * @param  pic_id 要删除的大图片的ID
		 	 * @return
		 	 * @throws BizException
		 	 */
		 	public int removeBigPic(String  pic_id) {
		 		
		 		// TODO Auto-generated method stub
		 		StringBuilder sb = new StringBuilder();
		 		sb.append(" delete BigPic   wher id=?");
				return	bigpicdao.jdbc().update(sb.toString(),
					new Object[]{  pic_id});
				
					}
		 		
		 		


		 	/**
		 	 * 依据条件查询大图片的列表
		 	 * @param pageSize  页码大小
		 	 * @param curPage   当前页
		 	 * @param BigPic  BigPic对象
		 	 * @return
		 	 * @throws BizException
		 	 */
			public List queryBigPic(int startrow, int endrow, Bigpic BigPicVO){
				
			
				// TODO Auto-generated method stub
		 		StringBuilder sb = new StringBuilder();
		 		sb.append(" select  id, pic_name, pic_url, if_enable from( select ta.*,rownum rn ");
		 		sb.append(" from (select ma.*,rownum  tn from(select *  from BigPic  t )ma)  ");
		 		sb.append(" ta where tn<=? ) f where f.rn>? ");
				return	bigpicdao.jdbc().list(sb.toString(),new Object[]{endrow,startrow}, Bigpic.class);
					
			}
		   
			/**
		     * 查询大图片的总数
		     * @param  tourOrderVO
		     * @return
		     * @throws BizException
		     */
		    public int queryBigPicCount(Bigpic BigPicVO){
		    	
		    	StringBuilder sb = new StringBuilder();
		    	String queryFiledstr="";
			    sb.append("select count(*)   from BigPic ");
			
				Object[] queryField=queryFiledstr.split(","); 
	   
	         if(queryFiledstr.equals(""))
	 			return	bigpicdao.jdbc().getJdbcTemplate().queryForInt(sb.toString());
	 		else
	 			return	bigpicdao.jdbc().getJdbcTemplate().queryForInt(sb.toString(),queryField);
	 	}

	         

		    /**
		     * 读取大图片中指定的条数信息
		     * @param readnum
		     * @return
		     */
		    public List  queryBigPic(int readnum) {
		    	
		    
		    	StringBuilder sb = new StringBuilder();
		    	sb.append("select ta.*,rownum rn ");
		    			sb.append("from (select ma.*,rownum  tn from(select *  from BigPic  t )ma) ");
		    		sb.append("	ta where tn<=? ");
					return	bigpicdao.jdbc().list(sb.toString(),new Object[]{readnum}, Bigpic.class);
		    }
		    
		    ////========小图片管理=========//////////////////
	    
	    
		    /**
			 * 添加小图片信息
			 * @param htGameTableVO
			 * @return
			 */
				public int loadSmallPic(Smallpic smallPicVO){
					   
					// TODO Auto-generated method stub
					StringBuilder sb = new StringBuilder();
					sb.append("insert into Smallpic (");
					sb.append("id, smallpic_name, pic_url, pic_x, pic_x2, pic_y2, pic_y, bigpic_id, if_enable");
					sb.append(") values(seq_SmallPic_id.nextVal,?,?,?,?,?,?,?,?)");
				return	smallpicdao.jdbc().update(sb.toString(),new Object[]{
			
					smallPicVO.getSmallpicName(),
				     smallPicVO.getPicUrl(),
					 smallPicVO.getPic_x(),
					 smallPicVO.getPic_x2(),
			 smallPicVO.getPic_y2(),
					 smallPicVO.getPic_y(),
					 smallPicVO.getBigpicId(),
						smallPicVO.getIfEnable()
		
					});
					
					

					
				}

			    
			     /**
			      * 根据ID查询小图片的详细
			      * @param send_id
			      * @return
			      * @throws BizException
			      */
			     public Smallpic querySmallPicDetail(String pic_id){
			    	 
			    		// TODO Auto-generated method stub
				 	StringBuilder sb = new StringBuilder();
				 		sb.append("select t.id, t.smallpic_name, t.pic_url, pic_x, pic_x2, pic_y2, pic_y, bigpic_id, t.if_enable,k.pic_name as bigPicName from smallpic t left join bigpic k on k.id=t.bigpic_id where t.id=?");
				return	(Smallpic)smallpicdao.jdbc().queryForObject(sb.toString(),new Object[]{pic_id},Smallpic.class);
			    	// BigDecimal bd=new BigDecimal(pic_id); 

			    	// Smallpic smallpicVO=  (Smallpic)smallpicdao.getHibernateTemplate().get(Smallpic.class, bd);	
					  //  return smallpicVO; 	
			    	 
			     }
			     
				 /**
			 	  * 保存小图片信息 
			 	  * @param htSmallPicVO
			 	  * @return
			 	  * @throws BizException
			 	  */
			 	public int saveSmallPic(Smallpic  smallPicVO){
			 		
			 		
			 		// TODO Auto-generated method stub
			 		StringBuilder sb = new StringBuilder();
			 		sb.append(" update  Smallpic set smallpic_name=?,pic_url=?, pic_x=?, pic_x2=?, pic_y2=?,pic_y=?, bigpic_id=?, if_enable=? where  id=?");
					return	smallpicdao.jdbc().update(sb.toString(),new Object[]{
						 smallPicVO.getSmallpicName(),
					     smallPicVO.getPicUrl(),
						 smallPicVO.getPic_x(),
						 smallPicVO.getPic_x2(),
				 smallPicVO.getPic_y2(),
						 smallPicVO.getPic_y(),
							smallPicVO.getBigpicId(),
							smallPicVO.getIfEnable(),
							smallPicVO.getId()
				
						});
			 		
			 	}
			 	/**
			 	 * 
			 	 * @param pic_id 要删除的小图片
			 	 * @return
			 	 * @throws BizException
			 	 */
			 	public int removeSmallPic(String pic_id) {
			 		
			 		// TODO Auto-generated method stub
			 		StringBuilder sb = new StringBuilder();
			 		sb.append(" delete SmallPic   where  id=?");
					return	smallpicdao.jdbc().update(sb.toString(),
						new Object[]{ pic_id});
					
						}
			 		
			 		


			 	/**
			 	 * 依据条件查询小图片列表
			 	 * @param pageSize  页码大小
			 	 * @param curPage   当前页
			 	 * @param smallPicVO  smallPicVO
			 	 * @return
			 	 * @throws BizException
			 	 */
				public List querySmallPic(int startrow, int endrow, Smallpic smallPicVO){
					
					
					// TODO Auto-generated method stub
			 		StringBuilder sb = new StringBuilder();
			 		sb.append(" select id, smallpic_name, pic_url, pic_x, pic_x2, pic_y2, pic_y, bigpic_id, if_enable from( select ta.*,rownum rn ");
			 		sb.append(" from (select ma.*,rownum  tn from(select *  from Smallpic  t )ma)  ");
			 		sb.append(" ta where tn<=? ) f where f.rn>? ");
					return	smallpicdao.jdbc().list(sb.toString(),new Object[]{endrow,startrow}, Smallpic.class);
						
				}
			   
				/**
			     * 根据条件查询小图片总记录数
			     * @param  tourOrderVO
			     * @return
			     * @throws BizException
			     */
			    public int querySmallPicCount(Smallpic smallPicVO){
			    	
			    	StringBuilder sb = new StringBuilder();
			    	String queryFiledstr="";
				    sb.append("select count(*)   from SmallPic ");
				
					Object[] queryField=queryFiledstr.split(","); 
		   
		         if(queryFiledstr.equals(""))
		 			return	smallpicdao.jdbc().getJdbcTemplate().queryForInt(sb.toString());
		 		else
		 			return	smallpicdao.jdbc().getJdbcTemplate().queryForInt(sb.toString(),queryField);
		 	}

		         

			    /**
			     * 读取小图片列表中指定的条数
			     * @param readnum
			     * @return
			     */
			    public List  querySmallPic(int readnum) {
			    	
			    
			    	StringBuilder sb = new StringBuilder();
			    	sb.append("select ta.*,rownum rn ");
			    			sb.append("from (select ma.*,rownum  tn from(select *  from SmallPic  t )ma) ");
			    		sb.append("	ta where tn<=? ");
						return	smallpicdao.jdbc().list(sb.toString(),new Object[]{readnum}, Smallpic.class);
			    }
			    
			    
			    ////========片场管理=========//////////////////
			    
				  /**
					 * 添加片场信息
					 * @param gameSceneVO
					 * @return
					 */
						public int loadGameScene(Gamescene gameSceneVO){
						
						    
					    	StringBuilder sb = new StringBuilder();
				
							sb.append("insert into gamescene(");
							sb.append("filed_id, parent_fieldid, gamescene_name, if_enable,greade");
							sb.append(") values(seq_gamescene_id.nextVal,?,?,?,?)");
						return	gamescenedao.jdbc().update(sb.toString(),new Object[]{
						
							gameSceneVO.getParentFieldid(),
							gameSceneVO.getGamesceneName(),
							gameSceneVO.getIfEnable(),
							gameSceneVO.getGreade()
							});
							
					    	
							
						}

					    
					     /**
					      * 根据ID查询片场的详细
					      * @param scene_id
					      * @return
					      * @throws BizException
					      */
					     public Gamescene queryGameSceneDetail(String scene_id){
					    	
						 		StringBuilder sb = new StringBuilder();
						 		sb.append(" select filed_id, parent_fieldid, gamescene_name, if_enable from gamescene where filed_id=?");
						return	(Gamescene)gamescenedao.jdbc().queryForObject(sb.toString(),new Object[]{scene_id},Gamescene.class);
									
					     
					     }
					     
						 /**
					 	  * 保存片场信息 
					 	  * @param htSmallPicVO
					 	  * @return
					 	  * @throws BizException
					 	  */
					 	public int saveGameScene(Gamescene  gameSceneVO){
					 		
					 		
					 		// TODO Auto-generated method stub
					 		StringBuilder sb = new StringBuilder();
					 		sb.append(" update  gamescene set   parent_fieldid=?, gamescene_name=?, if_enable=?,greade=? where  filed_id=?");
							return	gamescenedao.jdbc().update(sb.toString(),new Object[]{
								gameSceneVO.getParentFieldid(),
								gameSceneVO.getGamesceneName(),
								gameSceneVO.getIfEnable(),
								gameSceneVO.getFiledId(),
								gameSceneVO.getGreade()
								});
					 		
					 		
					 	}
					 	/**
					 	 * 
					 	 * @param scene_id 要删除的片场
					 	 * @return
					 	 * @throws BizException
					 	 */
					 	public int removeGameScene(String scene_id){
					 	
					 		// TODO Auto-generated method stub
					 		StringBuilder sb = new StringBuilder();
					 		sb.append(" delete from gamescene   where filed_id=?");
							return	gamescenedao.jdbc().update(sb.toString(),
								new Object[]{ scene_id});
					 	
					 	}


					 	/**
					 	 * 依据条件查询片场列表
					 	 * @param pageSize  页码大小
					 	 * @param curPage   当前页
					 	 * @param gameSceneVO  gameSceneVO
					 	 * @return
					 	 * @throws BizException
					 	 */
						public List queryGameScene(int startrow, int endrow, Gamescene gameSceneVO){
							

							// TODO Auto-generated method stub
					 		StringBuilder sb = new StringBuilder();
					 		sb.append(" select  filed_id, parent_fieldid, gamescene_name, if_enable,parentScenName,greade from( select ta.*,rownum rn ");
					 		sb.append(" from (select ma.*,rownum  tn from(select t.*,m.gamescene_name as parentScenName  from gamescene  t left join  gamescene m on t.parent_fieldid=m.filed_id  )ma)  ");
					 		sb.append(" ta where tn<=? ) f where f.rn>? ");
							return	gamescenedao.jdbc().list(sb.toString(),new Object[]{endrow,startrow}, Gamescene.class);
							
						}
					   
						/**
					     * 根据条件查询片场总记录数
					     * @param  tourOrderVO
					     * @return
					     * @throws BizException
					     */
					    public int queryGameSceneCount(Gamescene gameSceneVO){
					    	
			
				    	StringBuilder sb = new StringBuilder();
				    	String queryFiledstr="";
					    sb.append("select count(*)  from gamescene  t left join  gamescene m on t.parent_fieldid=m.filed_id ");
					
						Object[] queryField=queryFiledstr.split(","); 
			   
			         if(queryFiledstr.equals(""))
			 			return	gamescenedao.jdbc().getJdbcTemplate().queryForInt(sb.toString());
			 		else
			 			return	gamescenedao.jdbc().getJdbcTemplate().queryForInt(sb.toString(),queryField);
			 	
					    
					    }

				         

					    /**
					     * 读取片场列表中指定的条数
					     * @param readnum
					     * @return
					     */
					    public List  queryGameScene(int readnum){


					    	StringBuilder sb = new StringBuilder();
					    	sb.append("select ta.*,rownum rn ");
					    			sb.append("from (select ma.*,rownum  tn from(select *  from gamescene   t )ma) ");
					    		sb.append("	ta where tn<=? ");
								return	gamescenedao.jdbc().list(sb.toString(),new Object[]{readnum},Gamescene.class);
					    
					    
					    }
					    
					    
					
					    ////========房间管理=========//////////////////
					    
						  /**
							 * 添加房间信息
							 * @param gameHouseVO
							 * @return
							 *//*
								public int loadGameHouse(GameHouse gameHouseVO){
								  	StringBuilder sb = new StringBuilder();
									
									sb.append("insert into gamescene(");
									sb.append("filed_id, parent_fieldid, gamescene_name, if_enable");
									sb.append(") values(seq_gamescene_id.nextVal,?,?,?)");
								return	gamescenedao.jdbc().update(sb.toString(),new Object[]{
								
									gameSceneVO.getParentFieldid(),
									gameSceneVO.getGamesceneName(),
									gameSceneVO.getIfEnable()
									
									});
									
							    	
								}

							    
							     *//**
							      * 根据ID查询房间的详细
							      * @param house_id
							      * @return
							      * @throws BizException
							      *//*
							     public GameHouse  queryGameHouseDetail(String house_id){
							    		
								 		StringBuilder sb = new StringBuilder();
								 		sb.append(" select filed_id, parent_fieldid, gamescene_name, if_enablefrom gamescene where filed_id=?");
								return	(Gamescene)gamescenedao.jdbc().queryForObject(sb.toString(),new Object[]{scene_id},Gamescene.class);
							     }
							     
								 *//**
							 	  * 保存房间信息 
							 	  * @param htGameHouseVO
							 	  * @return
							 	  * @throws BizException
							 	  *//*
							 	public int saveGameHouse(GameHouse  gameHouseVO){
							 		
							 		// TODO Auto-generated method stub
							 		StringBuilder sb = new StringBuilder();
							 		sb.append(" update  gamescene set   parent_fieldid=?, gamescene_name=?, if_enablefrom=? where  filed_id=?");
									return	gamescenedao.jdbc().update(sb.toString(),new Object[]{
										gameSceneVO.getParentFieldid(),
										gameSceneVO.getGamesceneName(),
										gameSceneVO.getIfEnable()
								
										});
							 		
							 	}
							 	*//**
							 	 * 
							 	 * @param pic_id 要删除的房间
							 	 * @return
							 	 * @throws BizException
							 	 *//*
							 	public int removeGameHouse(String house_id){
							 		// TODO Auto-generated method stub
							 		StringBuilder sb = new StringBuilder();
							 		sb.append(" delete from gamescene   where scene_id=?");
									return	gamescenedao.jdbc().update(sb.toString(),
										new Object[]{ scene_id});
							 	
							 		
							 	}


							 	*//**
							 	 * 依据条件查询房间列表
							 	 * @param pageSize  页码大小
							 	 * @param curPage   当前页
							 	 * @param gameHouseVO  gameHouseVO
							 	 * @return
							 	 * @throws BizException
							 	 *//*
								public List queryGameHouse(int startrow, int endrow, GameHouse  gameHouseVO){

									// TODO Auto-generated method stub
							 		StringBuilder sb = new StringBuilder();
							 		sb.append(" select  filed_id, parent_fieldid, gamescene_name, if_enablefrom from( select ta.*,rownum rn ");
							 		sb.append(" from (select ma.*,rownum  tn from(select *  from gamescene  t )ma)  ");
							 		sb.append(" ta where tn<=? ) f where f.rn>? ");
									return	gamescenedao.jdbc().list(sb.toString(),new Object[]{endrow,startrow}, Smallpic.class);
									
								}
							   
								*//**
							     * 根据条件查询房间总记录数
							     * @param  tourOrderVO
							     * @return
							     * @throws BizException
							     *//*
							    public int queryGameHouseCount(GameHouse  gameHouseVO){
							    	

							    	StringBuilder sb = new StringBuilder();
							    	String queryFiledstr="";
								    sb.append("select count(*)   from gamescene ");
								
									Object[] queryField=queryFiledstr.split(","); 
						   
						         if(queryFiledstr.equals(""))
						 			return	gamescenedao.jdbc().getJdbcTemplate().queryForInt(sb.toString());
						 		else
						 			return	gamescenedao.jdbc().getJdbcTemplate().queryForInt(sb.toString(),queryField);
							    }

						         

							    *//**
							     * 读取房间列表中指定的条数
							     * @param readnum
							     * @return
							     *//*
							    public List  queryGameHouse(int readnum){

							    	StringBuilder sb = new StringBuilder();
							    	sb.append("select ta.*,rownum rn ");
							    			sb.append("from (select ma.*,rownum  tn from(select *  from gamescene   t )ma) ");
							    		sb.append("	ta where tn<=? ");
										return	gamescenedao.jdbc().list(sb.toString(),new Object[]{readnum},Gamescene.class);
							    	
							    }*/
			    
		    
}





